package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author lwj
 * @date 2025/5/26
 */
    
@Data
@TableName(value = "t_refund_record")
public class RefundRecord {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 用户第三方id
     */
    @TableField(value = "user_open_id")
    private String userOpenId;

    /**
     * 订单id
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 售后订单id
     */
    @TableField(value = "order_after_id")
    private Long orderAfterId;

    /**
     * 支付记录id
     */
    @TableField(value = "pay_record_id")
    private String payRecordId;

    /**
     * 退款类型，0：wx,1幺币
     */
    @TableField(value = "refund_type")
    private Integer refundType;

    /**
     * 微信侧订单号
     */
    @TableField(value = "wx_out_trade_no")
    private String wxOutTradeNo;

    /**
     * 微信退款id
     */
    @TableField(value = "wx_refund_id")
    private String wxRefundId;

    /**
     * 退款id
     */
    @TableField(value = "wx_refund_no")
    private String wxRefundNo;

    /**
     * 退款金额
     */
    @TableField(value = "refund_money")
    private Long refundMoney;

    /**
     * 0:发起退款，1：退款中，2：退款成功3：退款失败
     */
    @TableField(value = "refund_status")
    private Integer refundStatus;

    /**
     * 退款失败原因
     */
    @TableField(value = "refund_fail_remark")
    private String refundFailRemark;

    /**
     * 发起退款时间
     */
    @TableField(value = "refund_time")
    private LocalDateTime refundTime;

    /**
     * 退款中时间
     */
    @TableField(value = "refunding_time")
    private LocalDateTime refundingTime;

    /**
     * 退款成功时间
     */
    @TableField(value = "refund_ok_time")
    private LocalDateTime refundOkTime;

    /**
     * 退款失败时间
     */
    @TableField(value = "refund_fail_time")
    private LocalDateTime refundFailTime;

    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;
}